﻿using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;

namespace GKS.BusinessManagementHelper.DataLayer {
    public class Category {
        #region variables

        #endregion

        #region properties
        /// <summary>
        /// Get or Set the ID of this Category.
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// Get or Set the name of this Category.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Get or Set the description of this Category.
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Get or Set the creation date of this Category.
        /// </summary>
        public DateTime CreatedIn { get; set; }

        /// <summary>
        /// Get or Set the User that created this Category.
        /// </summary>
        public User CreatedBy { get; set; }

        /// <summary>
        /// Get or Set the time when this Category was last updated.
        /// </summary>
        public DateTime LastUpdate { get; set; }

        /// <summary>
        /// Get or Set the User who last updated this Category.
        /// </summary>
        public User UpdatedBy { get; set; }

        /// <summary>
        /// Get or Set the owner of this Category.
        /// </summary>
        public User Owner { get; set; }
        #endregion

        #region enums

        #endregion

        #region constructors
        /// <summary>
        /// The default constructor of a Category instance.
        /// </summary>
        public Category() {
            Id = Guid.NewGuid();            // set the ID of the new instance
            CreatedIn = DateTime.Now;       // set the creation date of the new instance
            LastUpdate = DateTime.Now;      // set the last update date and time of the new instance
        }

        /// <summary>
        /// A constructor of a Category instance.
        /// </summary>
        /// <param name="name">The name of this Category.</param>
        public Category(string name) : this() {
            Name = name;    // set the name of the new instance
        }

        /// <summary>
        /// A constructor of a Category instance.
        /// </summary>
        /// <param name="name">The name of this Category.</param>
        /// <param name="createdBy">The User who created this Category.</param>
        public Category(string name, User createdBy) : this(name) {
            CreatedBy = createdBy;
            UpdatedBy = createdBy;
            Owner = createdBy;
        }

        /// <summary>
        /// A constructor of a Category instance.
        /// </summary>
        /// <param name="name">The name of this Category.</param>
        /// <param name="description">The description of this Category.</param>
        public Category(string name, string description) : this(name) {
            Description = description;
        }

        /// <summary>
        /// A constructor of a Category instance.
        /// </summary>
        /// <param name="name">The name of this Category.</param>
        /// <param name="description">The description of this Category.</param>
        /// <param name="createdBy">The User who created this Category.</param>
        public Category(string name, string description, User createdBy) : this(name, createdBy) {
            Description = description;
        }
        #endregion

        #region methods

        #endregion
    }
}
